package edu.must.uh.Generator;

public class MySQLTypeConvertor implements TypeConvertor{
    @Override
    public String databaseType2JavaType(String column) {
        switch (column.toLowerCase()){
            case "varchar":
            case "char":return "String";
            case "longtext":return "String";            
            case "smallint":
            case "int":
            case "tinyint":return "Integer";
            case "bigint":return "Long";
            case "double":return "Double";
            case "float":return "Double";
            case "decimal":return "Double";
            case "clob":return "java.sql.Clob";
            case "blob":return "java.sql.Blob";
            case "date":return "java.sql.Date";
            case "time":return "java.sql.Time";
            case "timestamp":return "java.sql.Timestamp";
            case "datetime":return "java.util.Date";
            default:return null;
        }
    }

    @Override
    public String javaType2DatabaseType(String column) {
        //这里后面再完善
        return null;
    }

}
